// 封装函数实现用户持外化存储
import {Profile} from '@/types/data'
const PROFILE_KEY = 'seal-profile-3905'

// 存
export function setProfile(profile:Profile){
    localStorage.setItem(PROFILE_KEY ,JSON.stringify(profile))
}


// 取 
export function getProfile(){
    return  JSON.parse(localStorage.getItem(PROFILE_KEY) as string) || {}
}


// 删除
export function removeProfile(){
   localStorage.removeItem(PROFILE_KEY)
}